﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace netcore02.Controllers
{
    [Route("[controller]/[action]")]
    [ApiController]
    public class DefaultController : ControllerBase
    {
        [HttpGet]
        [Route("/")]
        public string Version()
        {
            return "V1.2345";
        }

        [HttpGet]
        [Route("/health")]
        public string Health()
        {
            return this.Version() + "___" + DateTime.Now.ToString();
        }

        [HttpGet]
        [Route("/healthy")]
        public string Healthy()
        {
            return this.Version() + "_______" + DateTime.Now.ToString();
        }


        [HttpGet]
        public string GetTime()
        {
            return DateTime.Now.ToString();
        }
    }
}
